package com.y.erp.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.y.common.base.BaseController;
import com.y.core.toolbox.ajax.RestResult;
import com.y.erp.model.Emp;
import com.y.erp.service.IEmpService;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Carl
 * @since 2016-12-23
 */
@RestController
@RequestMapping("/rest/emps")
public class EmpController extends BaseController{
	@Autowired
	private IEmpService empService;
	
	@RequestMapping(KEY_LIST)
	public RestResult index() {
		List<Emp> emps=empService.selectList(new EntityWrapper<Emp>(null));
		return rest(emps);
	}
}
